package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.dao.SetmealDao;
import com.example.domain.Setmeal;
import com.example.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SetmealServiceImpl extends ServiceImpl<SetmealDao, Setmeal> implements SetmealService {
    @Autowired
    private SetmealDao setmealDao;
    @Override
    public int selectByCategoryIdInt(Long id) {
        return setmealDao.selectByCategoryIdInt(id);
    }

    @Override
    public List<Setmeal> selectall(int pageCount, int pageSize) {
        return setmealDao.selectall(pageCount,pageSize);
    }

    @Override
    public int selectcount() {
        return setmealDao.selectcount();
    }

    @Override
    public List<Setmeal> selectbyname(int pageCount, int pageSize, String name) {
        return setmealDao.selectbyname(pageCount,pageSize,name);
    }

    @Override
    public void savesetmeal(Setmeal setmeal) {
        setmealDao.savesetmeal(setmeal);
    }

    @Override
    public int getstatusbyid(Long id) {
        return setmealDao.getstatusbyid(id);
    }

    @Override
    public void deletebyid(Long id) {
        setmealDao.deletebyid(id);
    }

    @Override
    public String getnamebyid(Long id) {
        return setmealDao.getnamebyid(id);
    }

    @Override
    public void updatestatusbyid(Setmeal setmeal) {
        setmealDao.updatestatusbyid(setmeal);
    }

    @Override
    public List<Setmeal> selectbycategoryandstatus(Setmeal setmeal) {
        return setmealDao.selectByCategoryIdandstatus(setmeal);
    }
}
